package priv.yiyuan.example.design.payment;

/**
 * 支付宝工厂
 *
 * @author YiYuan
 * @data 2025/8/14
 * @apoNote
 */
public class AlipaymentFactory implements PaymentType {

    private final PaymentPlatform paymentPlatform = new AlipayPlatform();

    @Override
    public PaymentMethod createQrCodePayment() {
        return new QrCodePayment(paymentPlatform);
    }

    @Override
    public PaymentMethod createAppPayment() {
        return new AppPayment(paymentPlatform);
    }

    @Override
    public PaymentMethod createH5Payment() {
        return new H5Payment(paymentPlatform);
    }

    @Override
    public String getTypeName() {
        return "支付宝";
    }
}
